﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;

namespace 视图.Controllers
{
    /// <summary>
    /// 控制器中返回视图组件
    /// </summary>
    [Route("[controller]")]
    public class TestComponentController : Controller
    {
        [HttpGet("index")]
        public IActionResult Index()
        {
            //控制器中返回视图组件
            //注意调用视图组件时,是区分大小写的,调用的字符串必须和Blogs3ViewComponent组件大小写对应,调用时省略ViewComponent
            return ViewComponent("Blogs3");
        }
    }
}